/********************************/
/*  Preferences Settings panel  */
/********************************/

.settings-section-preferences {
  height: 100%;
  position: relative;
  overflow: hidden;
  margin: 0 20px;
  height: 100%;
}

.background-picker-wrapper {
  display: inline-block;
  width: 130px;
  overflow: hidden;
  vertical-align: middle;
  margin-left: 5px;
}

.background-picker {
  cursor: pointer;
  float: left;
  height: 14px;
  width: 14px;
  background-color: transparent;
  margin-right: 5px;
  padding: 1px;
  position: relative;
  border: #888 2px solid;
}

.background-picker:hover {
  border-color: #eee;
}

.background-picker.selected {
  border-color: var(--highlight-color);
}

.settings-opacity-input {
  margin: 5px;
  vertical-align: middle;
}

.layer-opacity-input,
.tile-mask-opacity-input {
  width: 100px;
}

.settings-opacity-text {
  height: 31px;
  display: inline-block;
  line-height: 30px;
  width: 40px;
  border: 1px solid grey;
  box-sizing: border-box;
  border-radius: 3px;
  text-align: center;
}

.settings-item-grid-size,
.settings-item-grid-spacing,
.settings-item-grid-color {
  display: flex;
  align-items: center;
}

.settings-item-grid-size > label,
.settings-item-grid-spacing > label,
.settings-item-grid-color > label {
  width: 65px;
  flex-shrink: 0;
}

.grid-spacing-container .size-picker-option[data-size='1'] {
  padding: 7px;
}
.grid-spacing-container .size-picker-option[data-size='2'] {
  padding: 6px;
}
.grid-spacing-container .size-picker-option[data-size='4'] {
  padding: 5px;
}
.grid-spacing-container .size-picker-option[data-size='8'] {
  padding: 4px;
}
.grid-spacing-container .size-picker-option[data-size='16'] {
  padding: 3px;
}
.grid-spacing-container .size-picker-option[data-size='32'] {
  padding: 2px;
}
.grid-spacing-container .size-picker-option[data-size='64'] {
  padding: 1px;
}

.settings-item-grid-size .size-picker-option,
.settings-item-grid-spacing .size-picker-option {
  border-color: #888;
}

.settings-item-grid-size .size-picker-option:not(.selected):hover,
.settings-item-grid-spacing .size-picker-option:not(.selected):hover {
  border-color: white;
}

.grid-width-select,
.color-format-select {
  margin: 5px 5px 0 5px;
}


.grid-colors-list {
  overflow: hidden;
  padding: 0 5px;
}

.grid-colors-item {
  float: left;
  width: 20px;
  height: 20px;
  cursor: pointer;
  border: 2px solid #888;
  margin-right: 2px;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.grid-colors-item:hover {
  border-color: white;
}

.grid-colors-item.selected {
  border-color: gold;
}

.settings-section-preferences > .settings-title {
  /* Override the default 10px margin bottom for this panel */
  margin-bottom: 15px;
}

.settings-section-preferences .button-primary {
  margin-top: 10px;
}
